﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var auditData = Jxstar.findComboData('audit');
	var authtypeData = Jxstar.findComboData('authtype');
	var purtype2Data = Jxstar.findComboData('purtype2');

	var cols = [
	{col:{header:'记录状态', width:89, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: auditData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: auditData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < auditData.length; i++) {
				if (auditData[i][0] == value)
					return auditData[i][1];
			}
		}}, field:{name:'pur_apply_bid__auditing',type:'string'}},
	{col:{header:'采购单号', width:100, sortable:true}, field:{name:'pur_apply_bid__apply_code',type:'string'}},
	{col:{header:'项目编号', width:100, sortable:true, hidden:true}, field:{name:'pur_apply_bid__project_code',type:'string'}},
	{col:{header:'项目名称', width:240, sortable:true}, field:{name:'pur_apply_bid__project_name',type:'string'}},
	{col:{header:'授权形式', width:100, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: authtypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: authtypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < authtypeData.length; i++) {
				if (authtypeData[i][0] == value)
					return authtypeData[i][1];
			}
		}}, field:{name:'pur_apply_bid__auth_type',type:'string'}},
	{col:{header:'中标单位名称', width:157, sortable:true}, field:{name:'pur_apply_bid__provider_name',type:'string'}},
	{col:{header:'中标金额(万元)', width:100, sortable:true, renderer:JxUtil.formatNumber(6)}, field:{name:'pur_apply_bid__bid_money',type:'float'}},
	{col:{header:'中标单位被授权代表', width:127, sortable:true}, field:{name:'pur_apply_bid__bid_user',type:'string'}},
	{col:{header:'实施单位', width:119, sortable:true}, field:{name:'pur_apply_bid__dept_name',type:'string'}},
	{col:{header:'通知内容', width:199, sortable:true, hidden:true}, field:{name:'pur_apply_bid__bid_content',type:'string'}},
	{col:{header:'存根编号', width:100, sortable:true}, field:{name:'pur_apply_bid__bid_code',type:'string'}},
	{col:{header:'通知日期', width:100, sortable:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'pur_apply_bid__notice_date',type:'date'}},
	{col:{header:'登记人', width:100, sortable:true}, field:{name:'pur_apply_bid__record_user',type:'string'}},
	{col:{header:'登记日期', width:100, sortable:true, hidden:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'pur_apply_bid__record_date',type:'date'}},
	{col:{header:'采购单ID', width:100, sortable:true, hidden:true}, field:{name:'pur_apply_bid__apply_id',type:'string'}},
	{col:{header:'供应商ID', width:100, sortable:true, hidden:true}, field:{name:'pur_apply_bid__provider_id',type:'string'}},
	{col:{header:'项目ID', width:100, sortable:true, hidden:true}, field:{name:'pur_apply_bid__project_id',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'pur_apply_bid__bid_id',type:'string'}},
	{col:{header:'实施单位id', width:100, sortable:true, hidden:true}, field:{name:'pur_apply_bid__dept_id',type:'string'}},
	{col:{header:'采购方式', width:100, sortable:true, hidden:true, align:'center',
		renderer:function(value){
			for (var i = 0; i < purtype2Data.length; i++) {
				if (purtype2Data[i][0] == value)
					return purtype2Data[i][1];
			}
		}}, field:{name:'pur_apply_bid__pur_type',type:'string'}},
	{col:{header:'采购单名称', width:100, sortable:true, hidden:true}, field:{name:'pur_apply_bid__apply_name',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '0',
		isshow: '1',
		funid: 'pur_apply_bid'
	};
	
	
		
	return new Jxstar.GridNode(config);
}